package com.bgt.springboot.first.repository;

import com.bgt.springboot.first.vo.User;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by bgt on 2017/4/18.
 */
@Repository
public interface UserPageRepository extends PagingAndSortingRepository<User,Integer> {
    //实现分页功能   By的后边是对应的字段 必须一致
    Page<User> findByAge(Integer age,Pageable pageable);
}
